#ifndef MADSIMPLE_DECODER_H
#define MADSIMPLE_DECODER_H 1

#include<mad.h>
#include<pthread.h>

typedef struct {
	PyObject_HEAD
	PyObject *FileObject;

	/* callbacks  */
	PyObject *object;
	PyObject *outputFunc;
	PyObject *headerFunc;
	PyObject *errorFunc;

	struct mad_decoder decoder;
	int isclosed;
	char *buff;
	char *buff_out;
	int bufsiz;
	int bufsiz_out;
} Decoder;

extern PyMethodDef Decoder_methods[];
extern PyMemberDef Decoder_members[];
extern PyTypeObject DecoderType;


#endif //MADSIMPLE_DECODER_H
